#ifndef TRIANGLE_H
#define TRIANGLE_H

#include "Object.h"

#include <d3d11.h>
#include <dxgi.h>
#include <D3DX10.h>

struct Triangle : public Object
{
	Triangle();
	Triangle(const D3DXVECTOR3& A, const D3DXVECTOR3 B, const D3DXVECTOR3 C, const Colour& col);

	virtual float FindIntersection(const Ray& ray) override;
	virtual const D3DXVECTOR3& GetNormalAt(const D3DXVECTOR3& coord);
	
	float Distance();
	D3DXVECTOR3 GetNormal();

	//D3DXVECTOR3& GetNormal();

	D3DXVECTOR3 pointA;
	D3DXVECTOR3 pointB;
	D3DXVECTOR3 pointC;
	D3DXVECTOR3 m_normal;
};

#endif //TRIANGLE_H